<?php

namespace Modules\Admin\Database\Seeders;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;

class AuthsTableSeeder extends Seeder
{
    /**
     * php artisan module:seed Admin
     *
     * @return void
     */
    public function run()
    {
		$group_id1 = DB::table('auth_groups')->insertGetId(['title' => '超级管理员','created_at'=>date('Y-m-d H:i:s'),'rules'=>'10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|']);
		$group_id2 = DB::table('auth_groups')->insertGetId(['title' => '小管理员','created_at'=>date('Y-m-d H:i:s'),'rules'=>'10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|']);
        DB::table('admins')->insert([
            'username' => 'admin',
            'password' => bcrypt('123456'),
			'group_id' => $group_id1,
			'uuid'=> \Faker\Provider\Uuid::uuid(),
			'created_at'=>date('Y-m-d H:i:s')
        ]);
		DB::table('admins')->insert([
            'username' => '997786358',
            'password' => bcrypt('123456'),
			'group_id' => $group_id2,
			'uuid'=> \Faker\Provider\Uuid::uuid(),
			'created_at'=>date('Y-m-d H:i:s')
        ]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.index.index',
			'title'=>'后台首页',
			'status'=>0,
			'auth_open'=>0,
			'icon'=>'',
			'pid'=>0,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.index.clear',
			'title'=>'清除缓存',
			'status'=>0,
			'auth_open'=>0,
			'icon'=>'',
			'pid'=>0,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.index.logout',
			'title'=>'退出登录',
			'status'=>0,
			'auth_open'=>0,
			'icon'=>'',
			'pid'=>0,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.index.main',
			'title'=>'控制面板',
			'status'=>0,
			'auth_open'=>0,
			'icon'=>'',
			'pid'=>0,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.index.upadte_pwd_view',
			'title'=>'修改密码页面',
			'status'=>0,
			'auth_open'=>0,
			'icon'=>'',
			'pid'=>0,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.index.upadte_pwd',
			'title'=>'修改密码数据处理',
			'status'=>0,
			'auth_open'=>0,
			'icon'=>'',
			'pid'=>0,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.login.index',
			'title'=>'登录页',
			'status'=>0,
			'auth_open'=>0,
			'icon'=>'',
			'pid'=>0,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.login.login',
			'title'=>'登录提交',
			'status'=>0,
			'auth_open'=>0,
			'icon'=>'',
			'pid'=>0,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.upload.upload_file',
			'title'=>'单图上传',
			'status'=>0,
			'auth_open'=>0,
			'icon'=>'',
			'pid'=>0,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		$pid = DB::table('auth_rules')->insertGetId([
            'href' => 'admin',
			'title'=>'系统配置',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'icon-cogs',
			'pid'=>0,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		$id = DB::table('auth_rules')->insertGetId([
            'href' => 'admin.config.index',
			'title'=>'系统配置',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$pid, 
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.config.update',
			'title'=>'系统配置数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		
		$id = DB::table('auth_rules')->insertGetId([
            'href' => 'admin.email.index',
			'title'=>'邮件发送',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$pid, 
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.email.store',
			'title'=>'邮件发送数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		
		
		
        








        $id = DB::table('auth_rules')->insertGetId([
            'href' => 'admin.env.index',
            'title'=>'env配置',
            'status'=>1,
            'auth_open'=>1,
            'icon'=>'',
            'pid'=>$pid,
            'created_at'=>date('Y-m-d H:i:s')
        ]);
        DB::table('auth_rules')->insert([
            'href' => 'admin.env.data',
            'title'=>'列表数据',
            'status'=>0,
            'auth_open'=>1,
            'icon'=>'',
            'pid'=>$id,
            'created_at'=>date('Y-m-d H:i:s')
        ]);

        DB::table('auth_rules')->insert([
            'href' => 'admin.env.edit',
            'title'=>'编辑页面',
            'status'=>0,
            'auth_open'=>1,
            'icon'=>'',
            'pid'=>$id,
            'created_at'=>date('Y-m-d H:i:s')
        ]);
        DB::table('auth_rules')->insert([
            'href' => 'admin.env.update',
            'title'=>'编辑数据处理',
            'status'=>0,
            'auth_open'=>1,
            'icon'=>'',
            'pid'=>$id,
            'created_at'=>date('Y-m-d H:i:s')
        ]);


		
		$id = DB::table('auth_rules')->insertGetId([
            'href' => 'admin.modules.index',
            'title'=>'模块配置',
            'status'=>1,
            'auth_open'=>1,
            'icon'=>'',
            'pid'=>$pid,
            'created_at'=>date('Y-m-d H:i:s')
        ]);
        DB::table('auth_rules')->insert([
            'href' => 'admin.modules.data',
            'title'=>'模块配置列表数据',
            'status'=>0,
            'auth_open'=>1,
            'icon'=>'',
            'pid'=>$id,
            'created_at'=>date('Y-m-d H:i:s')
        ]);
		
		DB::table('auth_rules')->insert([
            'href' => 'admin.modules.edit',
            'title'=>'模块配置编辑页面',
            'status'=>0,
            'auth_open'=>1,
            'icon'=>'',
            'pid'=>$id,
            'created_at'=>date('Y-m-d H:i:s')
        ]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.modules.edit_data',
            'title'=>'模块配置编辑数据',
            'status'=>0,
            'auth_open'=>1,
            'icon'=>'',
            'pid'=>$id,
            'created_at'=>date('Y-m-d H:i:s')
        ]);

		DB::table('auth_rules')->insert([
            'href' => 'admin.modules.modules_update',
            'title'=>'模块配置编辑数据处理',
            'status'=>0,
            'auth_open'=>1,
            'icon'=>'',
            'pid'=>$id,
            'created_at'=>date('Y-m-d H:i:s')
        ]);

		DB::table('auth_rules')->insertGetId([
            'href' => 'admin.icon.index',
            'title'=>'字体管理',
            'status'=>1,
            'auth_open'=>1,
            'icon'=>'',
            'pid'=>$pid,
            'created_at'=>date('Y-m-d H:i:s')
        ]);


		
		
		
		/*            权限管理                  */
		
		
		
		$pid = DB::table('auth_rules')->insertGetId([
            'href' => 'admin',
			'title'=>'权限管理',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'icon-lifebuoy',
			'pid'=>0,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		$id = DB::table('auth_rules')->insertGetId([
            'href' => 'admin.admin.index',
			'title'=>'管理员列表',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$pid,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.admin.data',
			'title'=>'列表数据',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.admin.create',
			'title'=>'添加页面',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.admin.store',
			'title'=>'添加数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.admin.edit',
			'title'=>'编辑页面',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.admin.update',
			'title'=>'编辑数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.admin.status',
			'title'=>'调整状态',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		
		DB::table('auth_rules')->insert([
            'href' => 'admin.admin.update_pwd',
			'title'=>'初始化密码',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		
		DB::table('auth_rules')->insert([
            'href' => 'admin.admin.destroy',
			'title'=>'单个删除',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		
		$id = DB::table('auth_rules')->insertGetId([
            'href' => 'admin.auth_group.index',
			'title'=>'权限组列表',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$pid,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_group.data',
			'title'=>'列表数据',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_group.create',
			'title'=>'添加页面',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_group.store',
			'title'=>'添加数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_group.edit',
			'title'=>'编辑页面',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_group.update',
			'title'=>'编辑数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_group.status',
			'title'=>'调整状态',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_group.destroy',
			'title'=>'单个删除',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_group.access',
			'title'=>'配置规则页面',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_group.access_update',
			'title'=>'配置规则数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		
		
		$id = DB::table('auth_rules')->insertGetId([
            'href' => 'admin.auth_rule.index',
			'title'=>'权限列表',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$pid,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_rule.data',
			'title'=>'列表数据',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_rule.create',
			'title'=>'添加页面',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_rule.store',
			'title'=>'添加数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_rule.create_sublevel',
			'title'=>'添加子级页面',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_rule.store_sublevel',
			'title'=>'添加子级数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_rule.edit',
			'title'=>'编辑页面',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_rule.update',
			'title'=>'编辑数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_rule.status',
			'title'=>'菜单状态',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_rule.auth_open',
			'title'=>'是否验证权限',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_rule.sorts',
			'title'=>'排序',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.auth_rule.destroy',
			'title'=>'单个删除',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);



		/*                   数据库管理                                     */



		$pid = DB::table('auth_rules')->insertGetId([
            'href' => 'admin',
			'title'=>'数据库管理',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'icon-database',
			'pid'=>0,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		$id = DB::table('auth_rules')->insertGetId([
            'href' => 'admin.data_base.index',
			'title'=>'数据备份',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$pid, 
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.data_base.data',
			'title'=>'数据列表数据',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insertGetId([
            'href' => 'admin.data_base.table_detail',
			'title'=>'详情页',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id, 
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.data_base.table_data',
			'title'=>'表数据',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		
		
		
		
		$id = DB::table('auth_rules')->insertGetId([
            'href' => 'admin.data_base.restore',
			'title'=>'数据还原',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$pid, 
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.data_base.restore_data',
			'title'=>'数据还原列表数据',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.data_base.down_file',
			'title'=>'数据文件下载',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.data_base.del_sql_files',
			'title'=>'数据文件删除',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);


		/*                    地区管理                                 */
		$pid = DB::table('auth_rules')->insertGetId([
            'href' => 'admin',
			'title'=>'地区管理',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'icon-location2',
			'pid'=>0,
			'created_at'=>date('Y-m-d H:i:s')
		]);

		$id = DB::table('auth_rules')->insertGetId([
            'href' => 'admin.area.index',
			'title'=>'省市区',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$pid,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.area.data',
			'title'=>'列表数据',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.area.create',
			'title'=>'添加页面',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.area.store',
			'title'=>'添加数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.area.edit',
			'title'=>'编辑页面',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.area.update',
			'title'=>'编辑数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.area.status',
			'title'=>'状态',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.area.sorts',
			'title'=>'排序',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.area.destroy',
			'title'=>'单个删除',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.area.import_data',
			'title'=>'导入服务器数据',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		
		DB::table('auth_rules')->insert([
            'href' => 'admin.area.export_data',
			'title'=>'导出数据',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		/*           会员管理                                 */

		$pid = DB::table('auth_rules')->insertGetId([
            'href' => 'admin',
			'title'=>'会员管理',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'icon-user',
			'pid'=>0,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		$id = DB::table('auth_rules')->insertGetId([
            'href' => 'admin.user.index',
			'title'=>'会员列表',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$pid,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.user.data',
			'title'=>'列表数据',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.user.status',
			'title'=>'状态调整',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.user.destroy',
			'title'=>'单个删除',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		



		
		
		/*                  图片管理                                              */
		
		
		$pid = DB::table('auth_rules')->insertGetId([
            'href' => 'admin',
			'title'=>'图片管理',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'icon-images',
			'pid'=>0,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		$id = DB::table('auth_rules')->insertGetId([
            'href' => 'admin.picture.index',
			'title'=>'图片管理',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$pid,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.picture.data',
			'title'=>'列表数据',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.picture.create',
			'title'=>'添加页面',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.picture.store',
			'title'=>'添加数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		
		
		DB::table('auth_rules')->insert([
            'href' => 'admin.picture.edit',
			'title'=>'编辑页面',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.picture.update',
			'title'=>'编辑数据处理',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.picture.status',
			'title'=>'状态调整',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		
		DB::table('auth_rules')->insert([
            'href' => 'admin.picture.sorts',
			'title'=>'排序',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.picture.destroy',
			'title'=>'单个删除',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.picture.destroy_all',
			'title'=>'批量删除',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		
		
		
		
		
		$id = DB::table('auth_rules')->insertGetId([
            'href' => 'admin.image.index',
			'title'=>'图片列表',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$pid,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.image.data',
			'title'=>'列表数据',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.image.status',
			'title'=>'状态调整',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.image.destroy_all',
			'title'=>'清理无用图片',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		/*                     日志管理                                           */
		
		
		$pid = DB::table('auth_rules')->insertGetId([
            'href' => 'admin',
			'title'=>'日志管理',
			'status'=>1,
			'auth_open'=>1,
			'icon'=>'icon-stackoverflow',
			'pid'=>0,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		
		DB::table('auth_rules')->insertGetId([
            'href' => 'admin.logs.list',
            'title'=>'错误日志',
            'status'=>1,
            'auth_open'=>1,
            'icon'=>'',
            'pid'=>$pid,
            'created_at'=>date('Y-m-d H:i:s')
        ]);
		$id = DB::table('auth_rules')->insertGetId([
            'href' => 'admin.operation_log.index',
            'title'=>'操作日志',
            'status'=>1,
            'auth_open'=>1,
            'icon'=>'',
            'pid'=>$pid,
            'created_at'=>date('Y-m-d H:i:s')
        ]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.operation_log.data',
			'title'=>'列表数据',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.operation_log.destroy',
			'title'=>'单个删除',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('auth_rules')->insert([
            'href' => 'admin.operation_log.destroy_all',
			'title'=>'批量删除',
			'status'=>0,
			'auth_open'=>1,
			'icon'=>'',
			'pid'=>$id,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		
		
		
		
		
		
		$image_id = DB::table('images')->insertGetId([
            'url' => '/upload/image/20190204/admin_login.jpeg',
			'status'=>1,
			'open'=>1,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		DB::table('configs')->insert([
            'title' => 'lvacms后台管理',
			'image_id'=>$image_id,
			'image_status'=>1,
			'created_at'=>date('Y-m-d H:i:s')
		]);
		
		
		
    }
}
















